package com.feihong.yw189.bluetooth.dialog;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.feihong.yw189.R;
import com.feihong.yw189.activity.kaika.moneyout.ShiMingActivity;


/**
 * 2017/2/17.
 * 提示(账号绑定)
 */

public class TsDialog extends Dialog {

    private TextView goSmrz;
    private Activity context;

    public TsDialog(Context context) {
        super(context, R.style.QiaoDaoDialogStyle);
        this.context = (Activity) context;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ts_dialog);
        goSmrz = (TextView) findViewById(R.id.go_smrz);
        goSmrz.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                cancel();
                Intent intent = new Intent(context, ShiMingActivity.class);
                context.startActivity(intent);
            }
        });
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        cancel();
        context.finish();
    }
}
